﻿#region Usings

using System;
using System.Collections.Generic;
using Rail.Net.Common.Model;
using Rail.Net.Common.Resources;

#endregion

namespace Rail.Net.Common
{
    [Serializable]
    public class Constants
    {
        public Constants()
        {
            AgeContent = new List<NameValuePair>();
            for (var i = 0; i < 130; i++)
            {
                ((List<NameValuePair>) AgeContent).Add(new NameValuePair {Name = i.ToString(), Value = i.ToString()});
            }

            DiscountContent = new List<NameValuePair>
                                  {
                                      new NameValuePair
                                          {
                                              Name =
                                                  Global.MainModel_ListableItem_NoDiscount,
                                              Value = NoDiscount
                                          },
                                      new NameValuePair
                                          {
                                              Name =
                                                  Global.
                                                  MainModel_ListableItem_VorteilsCard,
                                              Value = VorteilsCard
                                          },
                                      new NameValuePair
                                          {
                                              Name =
                                                  Global.
                                                  MainModel_ListableItem_VorteilsCardFamily,
                                              Value = VorteilsCardFamily
                                          },
                                      new NameValuePair
                                          {
                                              Name =
                                                  Global.
                                                  MainModel_ListableItem_VorteilsCard26,
                                              Value = VorteilsCard26
                                          },
                                      new NameValuePair
                                          {
                                              Name =
                                                  Global.MainModel_ListableItem_Bahncard,
                                              Value = Bahncard
                                          },
                                      new NameValuePair
                                          {
                                              Name = Global.MainModel_ListableItem_Halbtax,
                                              Value = Halbtax
                                          },
                                      new NameValuePair
                                          {
                                              Name =
                                                  Global.
                                                  MainModel_ListableItem_CartaDArgentCartaVerde,
                                              Value = CartaDArgentCartaVerde
                                          }
                                  };

            PaymentContent = new List<NameValuePair>
                                 {
                                     new NameValuePair
                                         {
                                             Name =
                                                 Global.
                                                 MainModel_ListableItem_CreditCardVisa,
                                             Value = CreditCardVisa
                                         },
                                     new NameValuePair
                                         {
                                             Name =
                                                 Global.
                                                 MainModel_ListableItem_CreditCardMasterEurocard,
                                             Value = CreditCardMasterEurocard
                                         },
                                     new NameValuePair
                                         {
                                             Name =
                                                 Global.
                                                 MainModel_ListableItem_CreditCardAmericanExpress,
                                             Value = CreditCardAmericanExpress
                                         },
                                     new NameValuePair
                                         {
                                             Name =
                                                 Global.
                                                 MainModel_ListableItem_CreditCardDinersClub,
                                             Value = CreditCardDinersClub
                                         },
                                     new NameValuePair
                                         {
                                             Name =
                                                 Global.
                                                 MainModel_ListableItem_VorteilsCardWithPayment,
                                             Value = VorteilsCardWithPayment
                                         },
                                     new NameValuePair
                                         {
                                             Name =
                                                 Global.
                                                 MainModel_ListableItem_BusinessCard,
                                             Value = BusinessCard
                                         },
                                     new NameValuePair
                                         {
                                             Name = Global.MainModel_ListableItem_Paybox,
                                             Value = Paybox
                                         },
                                     new NameValuePair
                                         {
                                             Name =
                                                 Global.MainModel_ListableItem_A1CellPhone,
                                             Value = A1CellPhone
                                         },
                                     new NameValuePair
                                         {
                                             Name =
                                                 Global.
                                                 MainModel_ListableItem_OrangeCellPhone,
                                             Value = OrangeCellPhone
                                         },
                                     new NameValuePair
                                         {
                                             Name =
                                                 Global.
                                                 MainModel_ListableItem_DebitAustria,
                                             Value = DebitAustria
                                         },
                                     new NameValuePair
                                         {
                                             Name =
                                                 Global.
                                                 MainModel_ListableItem_DebitGermany,
                                             Value = DebitGermany
                                         },
                                     new NameValuePair
                                         {
                                             Name =
                                                 Global.
                                                 MainModel_ListableItem_DebitHolland,
                                             Value = DebitHolland
                                         },
                                     new NameValuePair
                                         {
                                             Name =
                                                 Global.
                                                 MainModel_ListableItem_BusinessCardBonus,
                                             Value = BusinessCardBonus
                                         },
                                     new NameValuePair
                                         {
                                             Name =
                                                 Global.
                                                 MainModel_ListableItem_BusinessCardSiemens,
                                             Value = BusinessCardSiemens
                                         }
                                 };
        }

        public const int MaxNumberOfThreads = 32;

        public const string DefaultCulture = "de-AT";

        public const string FromStationsCookie = "FromStations";

        public const string ToStationsCookie = "ToStations";

        public const string FromProductOffersCookie = "FromProductOffers";

        public const string ToProductOffersCookie = "ToProductOffers";

        public const string SearchModelCookie = "SearchModel";

        public const string RusCache = "RusCache";

        public const string StationsCache = "StationsCache";

        public const string BordersCache = "BordersCache";

        public const string RelationsCache = "RelationsCache";

        public const string Cache = "Cache";

        public const string CachingPolicy = "CachingPolicy";

        public const string FirstClassNumber = "1";

        public const string SecondClassNumber = "2";

        public const string ServiceLevelSeat = "SE";

        public const string ServiceLevelCouchette = "LE";

        public const string ServiceLevelSleepWagon = "BE";

        public const string DomesticRu = "81";

        public const string FullPriceTarif = "FullPriceTarif";

        public const string VorteilscardTarif = "VorteilscardTarif";

        public const string VorteilscardFamilyTarif = "VorteilscardTarif";

        public const string BusinesscardTarif = "BusinesscardTarif";

        public const string BusinesscardBonusTarif = "BusinesscardBonusTarif";

        public const string MinimaxTarif = "MinimaxTarif";

        public const string MinimaxVcTarif = "MinimaxVcTarif";

        public const string AgeOlderThen17 = "17";

        public const string AgeBetween15And16 = "15";

        public const string Age14 = "14";

        public const string AgeBetween12And13 = "12";

        public const string AgeBetween6And11 = "06";

        public const string AgeBetween4And5 = "04";

        public const string NoDiscount = "0";

        public const string VorteilsCard = "1";

        public const string VorteilsCardFamily = "2";

        public const string VorteilsCard26 = "3";

        public const string Bahncard = "4";

        public const string Halbtax = "5";

        public const string CartaDArgentCartaVerde = "8";

        public const string CreditCardVisa = "00";

        public const string CreditCardMasterEurocard = "01";

        public const string CreditCardAmericanExpress = "02";

        public const string CreditCardDinersClub = "03";

        public const string VorteilsCardWithPayment = "05";

        public const string BusinessCard = "06";

        public const string Paybox = "07";

        public const string A1CellPhone = "07";

        public const string OrangeCellPhone = "07";

        public const string DebitAustria = "15";

        public const string DebitGermany = "16";

        public const string DebitHolland = "17";

        public const string BusinessCardBonus = "61";

        public const string BusinessCardSiemens = "62";

        public const short RelationDescriptionBorder = 1;

        public const short RelationDescriptionVia = 2;

        public const short RelationDescriptionDestination = 3;

        public static List<string> Cultures = new List<string>
                                                  {
                                                      "de-AT",
                                                      "en-US",
                                                      "fr-FR",
                                                      "it-IT"
                                                  };

        public IEnumerable<NameValuePair> AgeContent;

        public IEnumerable<NameValuePair> DiscountContent;

        public IEnumerable<NameValuePair> PaymentContent;

        public const string GlobalDateFormat = "ddMMyyyy";

        public const string GlobalDateTimeFormat = "ddMMyyyyHHmm";

        public static List<string> GlobalComfortClasses = new List<string>
                                                              {
                                                                  ServiceLevelSeat,
                                                                  ServiceLevelCouchette,
                                                                  ServiceLevelSleepWagon
                                                              };

        public static Dictionary<string, List<string>> GlobalComfortClassValues = new Dictionary<string, List<string>>
                                                                                      {
                                                                                          {
                                                                                              ServiceLevelSeat,
                                                                                              new List<string>
                                                                                                  {
                                                                                                      "A",
                                                                                                      "B"
                                                                                                  }
                                                                                              },
                                                                                          {
                                                                                              ServiceLevelCouchette,
                                                                                              new List<string>
                                                                                                  {
                                                                                                      "D4",
                                                                                                      "D6"
                                                                                                  }
                                                                                              },
                                                                                          {
                                                                                              ServiceLevelSleepWagon,
                                                                                              new List<string>
                                                                                                  {
                                                                                                      "L",
                                                                                                      "M",
                                                                                                      "N",
                                                                                                      "P",
                                                                                                      "Q",
                                                                                                      "R",
                                                                                                      "S",
                                                                                                      "T",
                                                                                                      "U"
                                                                                                  }
                                                                                              }
                                                                                      };

        public static Dictionary<string, string> GlobalInversedTrains = new Dictionary<string, string>
                                                                        {
                                                                            {"9753", "60235"},                        // Miland - Austria
                                                                            {"234", "235"}                          // Rome - Austria
                                                                        };

        public static Dictionary<string, string> GlobalFullTarifs = new Dictionary<string, string>
                                                                        {
                                                                            {"81-81", "73"},                        // Austria - Austria
                                                                            {"81-80", "65,66,67,73"},               // Austria - Germany
                                                                            {"80-81", "65,66,67,73"},               // Germany - Austria
                                                                            {"80-80", "65,66,67,73"},               // Germany - Germany
                                                                            {"81-85", "65,66,67,73"},               // Austria - Switzerland
                                                                            {"85-81", "65,66,67,73"},               // Switzerland - Austria
                                                                            {"85-85", "65,66,67,73"},               // Switzerland - Switzerland
                                                                            {"81-84", "65,66,67,73"},               // Austria - Holland
                                                                            {"84-81", "65,66,67,73"},               // Holland - Austria
                                                                            {"84-84", "65,66,67,73"},               // Holland - Holland
                                                                            {"80-84", "65,66,67,73"},               // Germany - Holland
                                                                            {"84-80", "65,66,67,73"},               // Holland - Germany
                                                                            {"81-83", "76,77,73"},                  // Austria - Italy
                                                                            {"83-81", "76,77,73"},                  // Italy - Austria
                                                                            {"83-83", "76,77,73"}                   // Italy - Italy
                                                                        };

        public static Dictionary<string, string> GlobalChildTarifs = new Dictionary<string, string>
                                                                         {
                                                                             {"81-81", "72"},                       // Austria - Austria
                                                                             {"81-80", "65,66,67,72"},              // Austria - Germany
                                                                             {"80-81", "65,66,67,72"},              // Germany - Austria
                                                                             {"80-80", "65,66,67,72"},              // Germany - Germany
                                                                             {"81-85", "65,66,67,72"},              // Austria - Switzerland
                                                                             {"85-81", "65,66,67,72"},              // Switzerland - Austria
                                                                             {"85-85", "65,66,67,72"},              // Switzerland - Switzerland
                                                                             {"81-84", "65,66,67,72"},              // Austria - Holland
                                                                             {"84-81", "65,66,67,72"},              // Holland - Austria
                                                                             {"84-84", "65,66,67,72"},              // Holland - Holland
                                                                             {"80-84", "65,66,67,72"},              // Germany - Holland
                                                                             {"84-80", "65,66,67,72"},              // Holland - Germany
                                                                             {"81-83", "76,77,72"},                 // Austria - Italy
                                                                             {"83-81", "76,77,72"},                 // Italy - Austria
                                                                             {"83-83", "76,77,72"}                  // Italy - Italy
                                                                         };

        public static Dictionary<string, string> GlobalDiscountTarifs = new Dictionary<string, string>
                                                                            {
                                                                                {"81-81", "18"},                    // Austria - Austria
                                                                                {"81-80", "65,66,67,18"},           // Austria - Germany
                                                                                {"80-81", "65,66,67,18"},           // Germany - Austria
                                                                                {"80-80", "65,66,67,18"},           // Germany - Germany
                                                                                {"81-85", "65,66,67,18"},           // Austria - Switzerland
                                                                                {"85-81", "65,66,67,18"},           // Switzerland - Austria
                                                                                {"85-85", "65,66,67,72"},           // Switzerland - Switzerland
                                                                                {"81-84", "65,66,67,18"},           // Austria - Holland
                                                                                {"84-81", "65,66,67,18"},           // Holland - Austria
                                                                                {"84-84", "65,66,67,18"},           // Holland - Holland
                                                                                {"80-84", "65,66,67,18"},           // Germany - Holland
                                                                                {"84-80", "65,66,67,18"},           // Holland - Germany
                                                                                {"81-83", "76,77,18"},              // Austria - Italy
                                                                                {"83-81", "76,77,18"},              // Italy - Austria
                                                                                {"83-83", "76,77,18"}               // Italy - Italy
                                                                            };
    }
}